#ifndef FILE_H
#define FILE_H

#include <QObject>
#include <QString>
#include <QByteArray>
#include <QStringList>

class file : public QObject
{
    Q_OBJECT
public:
    explicit file(QObject *parent = nullptr);
    ~file();

    void setFileName(QString fileName);
    QString getFileName();

    void setFilePath(QString filePath);
    QString getFilePath();

    void setFileData(QByteArray fileData);
    QByteArray getFileData();

    void setFileList(QStringList fileList);
    QStringList getFileList();

    void clearFileList();
    void clearFileData();

    bool openFileDirectory();
    bool openImageFile();
    bool openTxtFile();
    bool openXmlFile();

    bool saveFileImage(QImage img);
    bool saveFileTxt(QString text);

signals:
    void filePathChanged(QString filePath);

private:
    QString m_fileName;
    QString m_filePath;
    QByteArray m_fileData;
    QStringList m_fileList;
};

#endif // FILE_H
